<template>
  <div class='detail first-box box-size'>
    <p class="title">{{data.title}}</p>
    <p class="time">{{data.time}}</p>

    <div v-html="data.content"></div>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      data:{
        title:"防冻液可以用水代替吗？别坏了才来哭诉",
        time:"2018-01-27 10:00",
        content:"test"
      }
    };
  },
  methods: {
    getList(){
      var params={
        id:_g.getRouterParams(this).id
      }
      _g.apiPost("knowledge/selectByPrimaryKey.do",params).then(res=>{
        if(res.data){
          this.data.title=res.data.title||"暂无"
          this.data.time=res.data.createTimeStr||"暂无"
          this.data.content=res.data.content||"暂无"
        }
      })
    }
  },
  created() {
    this.getList()
  }
};
</script>
<style lang="scss" scoped>
.detail {
  padding: 15px;
  color: #999;

  .title{
    font-size: 16px;
    color: #333;
  }
  .time{
    font-size: 14px;
    color: #999;
    line-height: 35px;
    border-bottom: 1px solid#F2F2F2;
  }
  >div{
    padding-top: 10px;
    text-indent: 20px;
  }
}
</style>